<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">

	<div th:insert="~{dashboard::Topedge}"></div>

	<body>
	<div th:insert="~{common/common::Headedge}"></div>

		<div class="container-fluid">
			<div class="row">
				<!--侧边栏-->
				<div th:insert="~{common/common::Sideedge}"></div>

				<main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
					<h2><a class="btn btn-sm btn-success" th:href="@{/addEmployee}">添加员工</a></h2>
					<div class="table-responsive">
						<table class="table table-striped table-sm">
							<thead>
								<tr>
									<th>id</th>
									<th>lastname</th>
									<th>email</th>
									<th>gender</th>
									<th>department</th>
									<th>Birth</th>
									<th>edit</th>
								</tr>
							</thead>
							<tbody>
							<tr th:each="emplpyee:${emp}">
								<td th:text="${emplpyee.getId()}"></td>
								<td th:text="${emplpyee.getLastName()}">></td>
								<td th:text="${emplpyee.getEmail()}">></td>
								<td th:text="${emplpyee.getGender()==0? '女':'男'}">></td>
								<td th:text="${emplpyee.getDepartment().getDepartmentName()}">></td>
								<td th:text="${#dates.format(emplpyee.getBirth(),'yyyy-MM-dd')}">></td>
								<!--操作-->
								<td>

									<a class="text" th:href="@{'/updateEmployee/'+${emplpyee.getId()}}" >修改</a>
										<!--<form th:action="@{'/updateEmployee/'+${emplpyee.getId()}}" >
											<input type="submit" value="修改">
										</form>-->

									<a class="text" th:href="@{'/deleteEmployee/'+${emplpyee.getId()}}" >删除</a>
										<!--<form th:action="@{'/deleteEmployee/'+${emplpyee.getId()}}" method="post">
											<input type="hidden"  method="_method" value="delete">
											<input type="submit" value="删除">
										</form>-->
								</td>
							</tr>
							</tbody>
						</table>
					</div>
				</main>
			</div>
		</div>

		<!-- Bootstrap core JavaScript
    ================================================== -->
		<!-- Placed at the end of the document so the pages load faster -->
		<script type="text/javascript" src="asserts/js/jquery-3.2.1.slim.min.js"></script>
		<script type="text/javascript" src="asserts/js/popper.min.js"></script>
		<script type="text/javascript" src="asserts/js/bootstrap.min.js"></script>

		<!-- Icons -->
		<script type="text/javascript" src="asserts/js/feather.min.js"></script>
		<script>
			feather.replace()
		</script>

		<!-- Graphs -->
		<script type="text/javascript" src="asserts/js/Chart.min.js"></script>
		<script>
			var ctx = document.getElementById("myChart");
			var myChart = new Chart(ctx, {
				type: 'line',
				data: {
					labels: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
					datasets: [{
						data: [15339, 21345, 18483, 24003, 23489, 24092, 12034],
						lineTension: 0,
						backgroundColor: 'transparent',
						borderColor: '#007bff',
						borderWidth: 4,
						pointBackgroundColor: '#007bff'
					}]
				},
				options: {
					scales: {
						yAxes: [{
							ticks: {
								beginAtZero: false
							}
						}]
					},
					legend: {
						display: false,
					}
				}
			});
		</script>

	</body>

</html>